{namespace n=GeorgRinger\News\ViewHelpers}

<f:layout name="Backend/Default" />

<f:section name="content">
	<h1>
		<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:administration.newsPidListing.header" />
	</h1>
	<p class="lead">
		<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:administration.newsPidListing.description" />
	</p>
	<f:form action="newsPidListing" class="form-horizontal">
		<div class="form-group">
			<label for="treeLevel" class="col-sm-3 control-label">
				<f:translate key="LLL:EXT:lang/locallang_general.xlf:LGL.recursive" />
			</label>
			<div class="col-sm-4">
				<f:form.select class="form-control" name="treeLevel" id="treeLevel" options="{1:1,2:2,3:3,4:4,5:5,6:6,7:7}" value="{treeLevel}" additionalAttributes="{onchange:'this.form.submit()'}" />
			</div>
		</div>
	</f:form>
	<table class="t3-table">
		<thead>
			<tr class="t3-row-header">
				<th>
					<f:translate key="LLL:EXT:lang/locallang_tca.xlf:pages" />
				</th>
				<th>
					<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_news" />
				</th>
				<th>
					<f:translate key="LLL:EXT:lang/locallang_tca.xlf:sys_category" />
				</th>
			</tr>
		</thead>
		<f:for each="{tree}" as="item">
			<tr class="{f:if(condition: item.countNewsAndCategories, then: '', else: 'hide_line')}">
				<td class="icon" nowrap="nowrap">
					<f:format.html parseFuncTSPath="">{item.HTML}</f:format.html>
					<f:link.action action="index" additionalParams="{id:item.row.uid}" title="UID: {item.row.uid}">{item.row.title}</f:link.action>
				</td>
				<td>{item.countNews}</td>
				<td>{item.countCategories}</td>
			</tr>
		</f:for>
	</table>
</f:section>
